import Vue from "vue"
//直接找到filter设置过滤器业务，Vue对象新增过滤器
Vue.filter("listFilter",function(val){
    const list=val.reduce((a,b)=>a+b,'');
	if(list.length<=8){
		return list.substring(0,12)
	}else{
		return list.substring(0,12)+'...'
	}
	
})
Vue.filter("menuFilter",function(val){
    const valAll=val.map(item=>item+"/")
    const list=valAll.reduce((a,b)=>a+b,'功效有:');
	if(list.length<=15){
		return list.substring(0,15)
	}else{
		return list.substring(0,15)+'...'
	}
	
})